package com.dhu719.label_end.mapper;

import com.dhu719.label_end.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>Title: $file.className</p>
 * <p>Description: </p>
 *
 * @author Kaboon
 * @date
 */
@Mapper
public interface UserMapper {
    @Select("select * from user " +
            "where " +
            "username = #{username} " +
            "and password = #{password}")
    User checkLogin(@Param("username") String username,
                    @Param("password") String password);

    @Insert("insert into user " +
            "values " +
            "()")
    int insert(@Param("user") User user);
}
